import {service} from "./baseRequest"


export function login(userAccount:any,password:any){
    const data = {
        userAccount,
        password
    }
    
    return service({
        url:'/accessToken',
        method:'post',
        data:data
    })
}

/**
 * 
 * @param userAccount 
 * @param password 
 * @param nickName 
 * @returns 若接口statecode=2xx，则账号创建成功；否则失败
 */
export function register(userAccount:any,password:any,nickName:any){
    const data = {
        userAccount,
        password,
        nickName
    }
    return service({
        url:'/user',
        method:'post',
        data:data
    })
}
